package cn.jinjimi.app.modules.notify.notifications;

import com.google.gson.annotations.SerializedName;
import cn.jinjimi.app.bean.RouterConstants;

/**
 * Created by zhenhua on 16/5/19.
 */
public class PushProductDTO extends PushDTO {

    @SerializedName("product_name")
    public String name;

    @SerializedName("product_url")
    public String url;

    @SerializedName("product_limit")
    public int limit;

    @Override
    public String getUrl() {
        return url == null ? RouterConstants.getNativeRouter("main/index") : url;
    }

    @Override
    public int getLimit() {
        return limit == 0 ? LIMIT_ANYONE : limit;
    }
}
